home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
You're the Director
/
You're The Director.iso
/
mac
/
MACF
/
MGER.DIR
/
00012_Script_Quicktime
< prev
next >
Wrap
Text File
|
1995-10-10
|
11KB
|
369 lines
-- QTMovie OpenMovie, <window type or wdef id>, <file name>, <location or rect>, initial options...
-- QTMovie OpenMovie, Direct, <file name>, <location or rect>, initial options...
-- QTMovie Direct, <movieID>, command
-- QTMovie Direct, <movieID>, Get, <property name>
-- QTMovie Direct, <movieID>, Set, <property name>, <property value>
--
--Initial options: loop, palindrome, mute, invisible, nocontroller, paused, closeOnFinish, showPoster,
-- clipTo <,rect>, loadIntoRAM, seeAllFrames, dontPaintWhite, badge, fastIdle, directWindow <,title>,
-- MovieWDEF only options: cmdKeyDraggable, borderWidth
--
--commands: play, pause, reverse, stepFwd, stepRev, copyFrame, copyPoster,
-- showController, hideController, loadSegIntoRAM, showPoster, idle, and more
--
--properties: windowLoc, windowRect, movieRect, movieLoc, bitMapClip, clipRect, currTime, audioLevel,
-- visible, rate, movieScale, windowName, windowCloseMsg, mouseDownMsg, cursorMsg,
-- timedCallBack, seeAllFrames, duration, fileSize, replaceMovie, hasController, segmentPlay,
-- segmentEnd, segmentStart, foreColor, backColor, badge, loop, palindrome, and more
-- Main command to load and play movie
-- can be modified using any of the above command structures
-- e.g. loadintoRAM: loads movie into RAM, clipto: fast crop of movie, etc.
on playQT Name, Loc, fullscreen
global movieID, QTEnd
if length(movieID)=0 then put QTMovie ("OpenMovie","Direct",the pathname&string(name), string(Loc),"closedOnFinish", "fastIdle") into movieID
if movieID contains "error" then
put movieID
beep
end if
put QTMovie("Direct", movieID, "Get", "duration") into QTEnd
QTMovie("Direct", movieID, "set", "currTime",0)
--this line shows how to blow up any movie to a full 640x480 screen
if fullscreen=1 then QTMovie("Direct", movieID, "Set","MovieRect","0, 0, 640, 480")
repeat while (value(QTMovie("Direct", movieID, "Get", "currTime")) < value(QTEnd))
QTMovie("Direct",movieID,"Idle")
end repeat
stopQT
end playqt
on playQTP Name, Loc, fullscreen
global movieID, QTEnd,fullscreenG,LowBnd,LastFrame
-- This plays QT for preview
--the pathname&
if length(movieID)=0 then put QTMovie ("OpenMovie","Direct",string(name), string(Loc),"closedOnFinish", "fastIdle") into movieID
if movieID contains "error" then
put "inside error"
put movieID
beep
end if
put QTMovie("Direct", movieID, "Get", "duration") into QTEnd
QTMovie("Direct", movieID, "set", "currTime",0)
--this line shows how to blow up any movie to a full 640x480 screen
if fullscreen=1 then QTMovie("Direct", movieID, "Set","MovieRect","0, 0, 320, 240")
else QTMovie("Direct", movieID, "Set","MovieRect","160, 140, 480, 380")
set LowBnd = -1
put "after LowBnd"
QTMovie("Direct",movieID,"play")
put "after play"
put "movieID",movieID
repeat while (value(QTMovie("Direct", movieID, "Get", "currTime")) < value(QTEnd) and ¼
value(QTMovie("Direct", movieID, "Get", "currTime")) > LowBnd)
put "Above play Prvw"
--updateStage
--QTMovie("Direct",movieID,"Idle")
--updatestage
play "F3"
--play 106
end repeat
stopQT
put "after stopQT"
go LastFrame
--put "after play prvw"
--QTMovie("Direct",movieID,"Idle")
end playqtp
on playQTF Name, Loc, fullscreen
global movieID, QTEnd,fullscreenG,LowBnd,Current,LastFrame,CurrentAudio,Clips,gSpeed
-- This plays QT for whole film
--if length(movieID)=0 then
put QTMovie ("OpenMovie","Direct",string(name), string(Loc),"closedOnFinish", "fastIdle") into movieID
if movieID contains "error" then
put "inside error"
put movieID
beep
end if
put QTMovie("Direct", movieID, "Get", "duration") into QTEnd
QTMovie("Direct", movieID, "set", "currTime",0)
put string(CurrentAudio) into CurrentAudio
QTMovie("Direct",movieID,"Set","audioLevel",CurrentAudio)
--this line shows how to blow up any movie to a full 640x480 screen
if fullscreen=1 then QTMovie("Direct", movieID, "Set","MovieRect","0, 0, 640, 480")
else QTMovie("Direct", movieID, "Set","MovieRect","160, 140, 480, 380")
set LowBnd = -1
QTMovie("Direct",movieID,"play")
if gSpeed = 2 then Forward
repeat while (value(QTMovie("Direct", movieID, "Get", "currTime")) < value(QTEnd) and ¼
value(QTMovie("Direct", movieID, "Get", "currTime")) > LowBnd)
if Current = TRUE then
play "F2"
else if Current = 0 then
play "F3"
else
play "F4"
end if
end repeat
if Current = 0 then
if fullscreenG=1 then
ChangeScreenSize Clips, "160,140",0
end if
end if
updateStage
stopQT
if Current = TRUE then
go 19
else if Current = 0 then
repeat with x = 13 to 17
puppetSprite x,TRUE
set the visible of sprite x to TRUE
puppetSprite x,FALSE
end repeat
puppetSprite 19,TRUE
set the visible of sprite 19 to FALSE
go (LastFrame-1)
repeat with x = 3 to 7
puppetSprite x,TRUE
set the visible of sprite x to TRUE
puppetSprite x,FALSE
end repeat
set MovieSeq = FALSE
setbar
updateStage
else
if fullscreenG=1 then
ChangeScreenSize Clips, "160,140",0
end if
go "Intro"
end if
end
-- closes the movie and flushes RAM used by movie object
on stopQT
global movieID,LastButton
QTMovie("Direct",movieID,"Dispose")
put "" into movieID
set LastButton = 0
end
on stopQTP
global movieID,LastButton
QTMovie("Direct",movieID,"Dispose")
put "" into movieID
set LastButton = 0
end
-- This command must be placed in any repeating loop to continue movie playback
--you can integrate other commands into a loop to add interactivity while the movie
--is playing
on IdleQT
global movieID,QTend
QTMovie("Direct",movieID,"Idle")
if value(QTMovie("Direct", movieID, "Get", "currTime")) >= value(QTEnd) then stopQT
end
on pauseQT
global movieID,LastButton
put "inside pauseQT"
QTMovie("Direct",movieID,"pause")
set LastButton = 1
end
on unpauseQT
global movieID
put "unpauseQT"
QTMovie("Direct",movieID,"play")
end
on restartQT Name, Loc, fullscreen
global movieID, QTEnd
put "inside restart QT"
if length(movieID)=0 then put QTMovie ("OpenMovie","Direct",the pathname&string(name), string(Loc),"closedOnFinish", "fastIdle") into movieID
if movieID contains "error" then
put movieID
beep
end if
put QTMovie("Direct", movieID, "Get", "duration") into QTEnd
--QTMovie("Direct", movieID, "set", "currTime",0)
--this line shows how to blow up any movie to a full 640x480 screen
if fullscreen=1 then QTMovie("Direct", movieID, "Set","MovieRect","0, 0, 640, 480")
repeat while (value(QTMovie("Direct", movieID, "Get", "currTime")) < value(QTEnd))
QTMovie("Direct",movieID,"Idle")
end repeat
stopQT
end restartqt
on Rewind
global movieID,gRewind,LowBnd
if (gRewind = 0) then
QTMovie("Direct",movieID,"reverse")
set gRewind = 1
set LowBnd = 0
end if
end
on Forward
global movieID,gRewind,gSpeed,LastButton
put "inside Forward"
if (gRewind = 1) then
QTMovie("Direct",movieID,"reverse")
set gRewind = 0
end if
set speed = 2.0
put string(speed) into speed
QTMovie("Direct",movieID,"Set","rate",speed)
set gSpeed = 2
set LastButton = 1
end
on ChangeScreenSize Name, Loc, Type
global fullscreenG,movieID,QTEnd,gRewind,gSpeed,CurrentAudio
if fullscreenG=0 then
--puppetSprite 1,TRUE
--set the moveableSprite of sprite 1 to TRUE
--put the locV of sprite 1 into Current
--set Current = Current-1
--set the locV of sprite 1 to Current
--updateStage
--set the visible of sprite 48 to TRUE
--put "just before pauseQT"
--pauseQT
if Type = 1 then
puppetSprite 48,TRUE
set the visibility of sprite 48 to TRUE
set the moveableSprite of sprite 48 to TRUE
UNLOADCAST
QTMovie("Direct", movieID, "Set","MovieRect","0, 0, 640, 480")
--updateSTage
--set the locv of sprite 48 to the locv of sprite 48 +1
--puppetSprite 48,FALSE
updateStage
end if
QTMovie("Direct", movieID, "Set","MovieRect","0, 0, 640, 480")
--unpauseQT
updateStage
set fullscreenG=1
--set the visible of sprite 48 to FALSE
else
-- puppetSprite 48,TRUE
--set the visible of sprite 48 to false
set gRewind = 0
--pauseQT
if Type = 1 then
puppetSprite 48,TRUE
set the moveableSprite of sprite 48 to TRUE
set the locv of sprite 48 to the locv of sprite 48 +1
set the visibility of sprite 48 to FALSE
end if
put QTMovie("Direct", movieID, "Get","currTime") into CTime
QTMovie("Direct", movieID, "Dispose")
--put "" into movieID
UNLOADCAST
--puppetSprite 1,TRUE
--set the moveableSprite of sprite 1 to TRUE
--put the locV of sprite 1 into Current
-- set Current = Current+1
-- set the locV of sprite 1 to Current
put QTMovie ("OpenMovie","Direct",string(name), string(Loc),"closedOnFinish", "fastIdle") into movieID
if movieID contains "error" then
put movieID
beep
end if
put QTMovie("Direct", movieID, "Get", "duration") into QTEnd
QTMovie("Direct", movieID, "set", "currTime",CTime)
put string(CurrentAudio) into CurrentAudio
QTMovie("Direct",movieID,"Set","audioLevel",CurrentAudio)
QTMovie("Direct", movieID, "Set","MovieRect","160, 140, 480, 380")
updateStage
--puppetSprite 1,FALSE
if gSpeed = 2 then
set speed = 2.0
put string(speed) into speed
QTMovie("Direct",movieID,"Set","rate",speed)
end if
set fullscreenG=0
--unpauseQT
updateStage
end if
end
on IncreaseVol
global movieID,CurrentAudio
put "CurrentAudio",CurrentAudio
put QTMovie("Direct",movieID,"Get","audioLevel") into CurrentAudio
if (CurrentAudio <255) then
set CurrentAudio = CurrentAudio + 30
end if
put integer(CurrentAudio) into CurrentAudio
put string(CurrentAudio) into CurrentAudio
pauseQT
QTMovie("Direct",movieID,"Set","audioLevel",CurrentAudio)
unpauseQT
end
on DecreaseVol
global movieID,CurrentAudio
put QTMovie("Direct",movieID,"Get","audioLevel") into CurrentAudio
put "decreaseVol"
put "CurrentAudio",CurrentAudio
if (CurrentAudio >50) then
set CurrentAudio = CurrentAudio - 50
else
set CurrentAudio = 0
end if
put integer(CurrentAudio) into CurrentAudio
put string(CurrentAudio) into CurrentAudio
pauseQT
QTMovie("Direct",movieID,"Set","audioLevel",CurrentAudio)
unpauseQT
end